import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'RootLogin',
      component: ()=> import("@/views/Login/Login.vue")
    },
    {
      path: '/login',
      name: 'Login',
      component: ()=> import("@/views/Login/Login.vue")
    },
    {
      path:'/register',
      name:'Register',
      component:()=>import("@/views/Login/Register.vue")
    },
    {
      path:'/forgetPassword',
      name:'ForgetPassword',
      component:()=>import("@/views/Login/ForgetPassword.vue")
    },
    {
      path:'/framework',
      name:'Framework',
      component:()=>import("@/views/Framework/Framework.vue"),
      children:[
        {
          path:':category',
          name:'category',
          component:()=>import("@/views/HomePage/CategoryPage.vue")
        }
      ]
    },
    {
      path:'/userInfo',
      name:'UserInfo',
      component:()=>import("@/views/UserInfo/UserInfo.vue")
    }
  ]
})

export default router
